<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>js数组</title>
		<script>
			var a=new Array(0);
			var b=["apple","banana","pear","grape"];
			alert("a长度是:"+a.length);
			a[0]="王飞";
			a[1]="李君";
			a[2]="陆洋";
			a[30]="贾瑞";
			alert("a长度是:"+a.length);
			a["clssname"]="智海科技"; 
			a["startdate"]="2019-3-6";
			/*alert("a长度是:"+a.length);
			alert(a["clssname"]);*/
			for(var i in a){
				document.write(i+"="+a[i]+"<br/>");
			}
			var str=a.join("$");
			alert(str);
			
		</script>
	</head>
	<body>
	</body>
</html>
